.class public Lcom/a0soft/gphone/a/b;
.super Ljava/lang/Object;
.source "aTextUtil.java"


# static fields
.field private static a:Ljava/text/DecimalFormat;

.field private static final b:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 22
    const-class v0, Lcom/a0soft/gphone/a/b;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/a0soft/gphone/a/b;->b:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 18
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method private static a(D)Ljava/lang/String;
    .locals 2
    .parameter

    .prologue
    .line 128
    sget-object v0, Lcom/a0soft/gphone/a/b;->a:Ljava/text/DecimalFormat;

    if-nez v0, :cond_0

    .line 130
    new-instance v0, Ljava/text/DecimalFormat;

    const-string v1, "0.##"

    invoke-direct {v0, v1}, Ljava/text/DecimalFormat;-><init>(Ljava/lang/String;)V

    sput-object v0, Lcom/a0soft/gphone/a/b;->a:Ljava/text/DecimalFormat;

    .line 131
    :cond_0
    sget-object v0, Lcom/a0soft/gphone/a/b;->a:Ljava/text/DecimalFormat;

    .line 134
    const/4 v1, 0x3

    invoke-virtual {v0, v1}, Ljava/text/DecimalFormat;->setGroupingSize(I)V

    .line 140
    invoke-virtual {v0, p0, p1}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static a(J)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 95
    invoke-static {p0, p1}, Lcom/a0soft/gphone/a/b;->b(J)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private static b(J)Ljava/lang/String;
    .locals 6
    .parameter

    .prologue
    const/high16 v5, 0x4480

    const-wide/high16 v3, 0x4090

    .line 101
    const/4 v0, 0x0

    .line 102
    long-to-float v1, p0

    .line 104
    cmpl-float v2, v1, v5

    if-ltz v2, :cond_0

    .line 105
    const-string v0, "KB"

    .line 106
    float-to-double v1, v1

    div-double/2addr v1, v3

    double-to-float v1, v1

    .line 107
    cmpl-float v2, v1, v5

    if-ltz v2, :cond_0

    .line 108
    const-string v0, "MB"

    .line 109
    float-to-double v1, v1

    div-double/2addr v1, v3

    double-to-float v1, v1

    .line 110
    cmpl-float v2, v1, v5

    if-ltz v2, :cond_0

    .line 111
    const-string v0, "GB"

    .line 112
    float-to-double v1, v1

    div-double/2addr v1, v3

    double-to-float v1, v1

    .line 117
    :cond_0
    float-to-double v1, v1

    invoke-static {v1, v2}, Lcom/a0soft/gphone/a/b;->a(D)Ljava/lang/String;

    move-result-object v1

    .line 119
    if-eqz v0, :cond_1

    .line 120
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 121
    :goto_0
    return-object v0

    :cond_1
    move-object v0, v1

    goto :goto_0
.end method
